// stores/app.js 登录时的设置，比如: 自动登录、记住密码...
import { defineStore } from 'pinia'
// import { useCache } from '@/render/hooks/useCache'

// const { wsCache } = useCache()
export const useLoginStore = defineStore('login', {
  state: () => {
    return {
      loginSetting: {
        autoLogin: false,
        rememberPassword: false
      }
    }
  },
  actions: {
    setLoginSetting(e) {
      // @ts-ignore
      const bol = this.loginSetting[e]
      // @ts-ignore
      this.loginSetting[e] = !bol
      console.log(this.loginSetting)
      //  wsCache.set('test','111')
      // const res= wsCache.get('test')
      // this.count++
    }
  }
})
